/**
 * 
 */
package com.dycn.posdashboard.data;

import java.io.Serializable;

import com.dycn.posdashboard.services.CommonServices;

/**
 * @author gongqiyi
 *
 */
public class ServicesResultObject<T> implements Serializable {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 6716587799695131748L;
	private String resultMsg="";//消息内容
	
	//CommonServices.RESULT_CODE_SUCCESS;
	private int resultCode=CommonServices.RESULT_CODE_READY;//100 表示成功 具体值有具体的业务逻辑定义
	private T returnObj;//执行返回的对象
	
	public boolean isSuccess(){
		if(this.getResultCode()==CommonServices.RESULT_CODE_SUCCESS){
			return true;
		}else{
			return false;
		}
	}
	
	public String getResultMsg() {
		if(resultMsg==null||resultMsg.trim().equals("")){
			resultMsg="code:"+resultCode+" 错误~~";
		}
		return resultMsg;
	}
	public void setResultMsg(String resultMsg) {
		this.resultMsg = resultMsg;
	}
	public int getResultCode() {
		return resultCode;
	}
	public void setResultCode(int resultCode) {
		this.resultCode = resultCode;
	}
	public T getReturnObj() {
		return returnObj;
	}
	public void setReturnObj(T returnObj) {
		this.returnObj = returnObj;
	}


}
